import React, { Component } from 'react'
import Registe from './Registe'
import Login from './Login'
// 注意: withCommon只是一个函数,这个函数返回值才是真正的Common组件
import withCommon from './common'
const Common1 = withCommon(Login)
const Common2 = withCommon(Registe)
export default class App extends Component {
  //需求: 要把app组件中的一个状态数据叫做msg,传递给Login或Registe
  state = {
    msg: '123',
  }
  render() {
    return (
      <div>
        <Common1 msg={this.state.msg} xxx={1} yyy={2}></Common1>
        <Common2></Common2>
      </div>
    )
  }
}
